void setup() {
  // put your setup code here, to run once:

}
const int analogOutPin=6;   //LED light control
unsigned char ledLight=0;
int flag = 0;

void loop() {
   if(ledLight<256&&flag==0){
   ledLight++;
   }
   else{
   flag = 1;
   ledLight--;
   if(ledLight==0){
   flag=0;
   }
   }
   analogWrite(analogOutPin, ledLight);
  // put your main code here, to run repeatedly:

}
